import React from 'react';
import Clock from '../components/clock';
import RVue from '../components/rvue';

export default class Home extends React.Component {
  constructor(props) {
    super(props);
    this.value = 0;
  }

  render() {
    return (
      <div className="App">
        <h1>Home</h1>
        <ul>
          <li>
            <a href="/about">跳转About</a>
          </li>
          <li>
            <a href="/calculator">跳转Calculator</a>
          </li>
          <li>
            <a href="/invoices">跳转Invoices</a>
          </li>
          <li>
            <a href="/propsrender">跳转Props Render</a>
          </li>
        </ul>
        <Clock />
        <RVue value={this.value} />
        <button onClick={this.add}>add</button>
      </div>
    );
  }

  add() {
    this.value += 1;
  }
}
